#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
'''
list = {
	'aa': '11',
	'bb': '22',
	'cc': '33'
}
for key in list:
	print key + ':', list[key]

list = set(['A', 'B', 'C', 'C'])
print list
print 'A' in list

weekdays = set(['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN'])
str = str(input('请输入：'))
if str in weekdays:
	print 'ok'
else:
	print 'ng'

t_list = set([('aa', 100), ('bb', '99')])
for item in t_list:
	print item[0] + ':', item[1]

s = set(['Adam', 'Lisa', 'Paul'])
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for l_item in L:
	if l_item in s:
		s.remove(l_item)
	else:
		s.add(l_item)
print s


def test_fun(num):
	L = []
	x = 1
	while x <= num:
		L.append( x * x )
		x = x + 1
	return sum(L)
print test_fun(10)
'''

sum_l = [-1, 3, 5]

def square_of_sum(list):
	sum_list = []
	for l_item in list:
		sum_list.append(l_item * l_item)
	return sum(sum_list)

def sum_list(list):
	sum = 0
	for l_i in list:
		sum = sum + l_i * l_i
	return sum
print sum_list(sum_l)
print square_of_sum(sum_l)
